<?php
$host="127.0.0.1";
$db_user="root";
$db_pass="123456";
$db_name="mysql";

$con=mysql_connect($host,$db_user,$db_pass);
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db($db_name,$con);
mysql_query("SET NAMES utf8"); 
?>